<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>确认订单</title>
    <link rel="icon" href="img/milogo.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="font/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="CSS/reset.css"/>
    <link rel="stylesheet" type="text/css" href="CSS/address.css"/>
    <link rel="stylesheet" type="text/css" href="CSS/currency.css"/>
    <link rel="stylesheet" type="text/css" href="CSS/confirm.css"/>
</head>
<body>
<!-- 我的购物车顶部导航栏 -->
<div class="header-box">
    <div class="container clearfix">
        <div class="fl header-left">
            <div class="iconfont icon-icon-xiaomiguishu"></div>
            <div>确认订单</div>
        </div>
        <div class="fr header-right">
            <ul>
                <li class="user-title">
                    <p>
                        [[${session.currentUser.username}]]<span class="iconfont icon-xia"></span>
                    </p>
                    <div class="user-list">
                        <ul>
                            <li>个人中心</li>
                            <li>评价晒单</li>
                            <li>我的喜欢</li>
                            <li>小米账户</li>
                            <li>退出登录</li>
                        </ul>
                    </div>
                </li>
                <li><a href="/personal/order">我的订单</a></li>
            </ul>
        </div>
    </div>
</div>


<!-- 中间部分 -->

<div>
    <div class="container ">
        <div class="orderInfor">
            <div class="orderInfor-title">收货地址</div>
            <div class="add-box" th:addressid="${a.id}" th:each="a:${addressList}">
                <div class="address-list">
                    <div class="addressBox clearfix">
                        <div class="address-label" th:text="${a.tag}"></div>
                        <div class="address-name" th:text="${a.man}"></div>
                        <div class="address-number" th:text="${a.tel}"></div>
                        <div class="address-address" th:text="${a.province+' ' +a.city+' '+a.area}"></div>
                        <div class="address-detailed" th:text="${a.address}"></div>
                        <div class="address-change">
                            <span class="address-changeed">修改</span>
                            <span class="address-dele">删除</span>
                        </div>
                    </div>
                </div>
            </div>
<!--            <div class="addAddress-box">-->
<!--                <div class="addAddress">-->
<!--                    <p class="iconfont icon-jiahao-"></p>-->
<!--                    <span>添加新地址</span>-->
<!--                </div>-->
<!--            </div>-->


            <div class="orderInfor-title">商品及优惠卷</div>
            <div class="order-infor" th:each="c:${cartList}">
                <div><img src="img/confirm/obj1.jpg"></div>
                <div class="order-infor-name" th:text="${c.name}"></div>
                <div class="order-infor-num">[[${c.price}]]元 x [[${c.amount}]]</div>
                <div class="order-infor-status"></div>
                <div class="order-infor-money">[[${c.price*c.amount}]]元</div>
            </div>
            <div class="mode">
                <div class="orderInfor-title">配送方式</div>
                <div>包邮</div>
            </div>
            <div class="invoice">
                <div class="orderInfor-title">发票</div>
                <div>电子普通发票</div>
                <div>个人</div>
                <div>商品明细</div>
                <div class="invoice">修改></div>
            </div>

            <div class="settlement-box clearfix">        <!-- 发票下，结算详情 -->
                <div class="settlement-left fl">
                    <div class="settlement-left-top"><span class="iconfont icon-jiahao-"></span>使用优惠卷</div>
                    <div class="settlement-left-bottom"><span class="iconfont icon-jiahao-"></span>使用小米礼品卡</div>
                </div>
                <div class="settlement-right fr">
                    <table>
                        <tr>
                            <td>商品件数：</td>
                            <td>1件</td>
                        </tr>
                        <tr>
                            <td>商品总价：</td>
                            <td>1699元</td>
                        </tr>
                        <tr>
                            <td>活动优惠：</td>
                            <td>-0元</td>
                        </tr>
                        <tr>
                            <td>优惠卷抵扣：</td>
                            <td>-0元</td>
                        </tr>
                        <tr>
                            <td>运费：</td>
                            <td>0元</td>
                        </tr>
                        <tr>
                            <td>应付总额：</td>
                            <td class="moneyTotla"><b>1699</b>元</td>
                        </tr>
                    </table>
                </div>

            </div>
            <div class="address-bottom-box clearfix">
                <form action="/order/save" method="post">
                    <input type="hidden" name="ids" th:value="${param.ids}"/>
                    <input type="text" id="addressId" name="addressId"/>
                    <div class="address-left fl">
                        <p>
                            <span>张三</span>
                            <span>164****7473</span>
                        </p>
                        <p>
                            <span>山西 阳泉市 平定县 发的发个体户</span>
                            <span class="address-changeed">修改</span>
                        </p>
                    </div>
                    <div class="address-right fr">
                        <button class="return" type="button">返回购物车</button>
                        <button class="buy">立即下单</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<!-- 添加地址弹出框 -->
<div class="alert-box">
    <div class="alert">
        <p class="alert-title clearfix">
            <span class="title">添加收获地址</span>
            <span class="close">x</span>
        </p>
        <form>
            <div class="alert-box-content">
                <div class="alert-bottom-box name-box">
                    <label for="input-name" class="plaLabel pla-name">姓名</label>
                    <input id="input-name" type="text" class="input input-name"/>
                </div>
                <div class="alert-bottom-box number-box">
                    <label for="input-number" class="plaLabel pla-number">手机号</label>
                    <input id="input-number" type="text" class="input input-number"/>
                </div>

                <div class="alert-bottom-box choice-box">
                    <label for="input-choice" class="plaLabel pla-choice">选择省/市/区/街道 <span
                            class="iconfont icon-you"></span></label>
                    <input id="input-choice" type="text" class="input input-choice"/>

                    <div class="choice-alert">
                        <div class="clearfix">
                            <span class="closeAddress">x</span>
                            <div class="lookup-box">
                                <span class="iconfont icon-chazhaosousuo"></span>
                                <input id="input-lookup" type="text" class="input input-lookup"
                                       placeholder="输入街道、乡镇、小区或商圈名称"/>
                            </div>
                            <div class="address-des">例如：北京 华润五彩城</div>
                            <hr>
                            <div class="choice-hand">手动选择地址 ></div>
                        </div>

                        <div>
                            <!-- 手动选择地址 -->

                        </div>
                    </div>
                </div>

                <div class="alert-bottom-box address-box">
                    <label for="input-address" class="plaLabel pla-address">详细地址</label>
                    <input id="input-address" type="text" class="input input-address"/>
                </div>

                <div class="alert-bottom-box addressLabel-box">
                    <label for="input-addressLabel" class="plaLabel pla-addressLabel">地址标签</label>
                    <input id="input-addressLabel" type="text" class="input input-addressLabel"/>
                </div>
            </div>
        </form>


        <div class="determine-box">
            <button id="determine" type="button" class="determine">确定</button>
            <button id="cancel" type="button" class="cancel">取消</button>
        </div>
    </div>
</div>


<!-- 发票弹出框 -->

<th:block th:include="footer"/>


<script type="text/javascript" src="/JS/jquery.js"></script>
<script type="text/javascript" src="/JS/address.js"></script>
<script type="text/javascript" src="/JS/confirm.js"></script>
<script src="/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(["layer"],function(){
        var layer = layui.layer;
        var $ = layui.jquery;

        $(".add-box").on("click",function(){
            $(this).addClass("act").siblings().removeClass("act");
            $("#addressId").val($(this).attr("addressid"));
        });
    });
</script>
</body>
</html>
